package ru.jexp.rcp.supply.n.commands;

import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.handlers.HandlerUtil;

import ru.jexp.rcp.supply.view.ViewPartNavigation;

public class HandlerOpenNavigationView extends AbstractHandler {

	public static final String ID = "ru.jexp.rcp.supply.n.commands.handleropennavigationview";
	@Override
	public Object execute(ExecutionEvent event) throws ExecutionException {
		try {
			HandlerUtil.getActiveWorkbenchWindow(event).getActivePage().showView(ViewPartNavigation.ID);
		} catch (PartInitException e) {
			e.printStackTrace();
		}
		return null;
	}
}
